<div>
    <vc:create path="property/viewMainFee" feeName="物业费" feeTypeCd="888800010001" payName="propertyPay"></vc:create>
    <div class="row">
        <div class="col-lg-12">
            <div class="ibox">
                <div class="ibox-title">
                    <h5>
                        <vc:i18n name="缴费历史" namespace="propertyFee"></vc:i18n>
                    </h5>
                </div>
                <div class="ibox-content">
                    <div class="row">
                        <div class="col-sm-3 input-group">
                            <input size="16" type="text" :placeholder="vc.i18n('请选择开始时间','propertyFee')" readonly v-model="feeDetailInfo.startTime" class="form-control form-control-sm start_time">
                        </div>
                        <div class="col-sm-3 input-group">
                            <input size="16" type="text" :placeholder="vc.i18n('请选择结束时间','propertyFee')" readonly v-model="feeDetailInfo.endTime" class="form-control form-control-sm end_time">
                        </div>
                        <div class="col-sm-6">
                            <button type="button" class="btn btn-primary btn-sm" v-on:click="queryFeeDetailMethod()">
                                <i class="fa fa-search"></i>
                                <span><vc:i18n name="马上查询" namespace="propertyFee"></vc:i18n></span>
                            </button>
                            <button type="button" class="btn btn-info btn-sm" v-on:click="resetFeeDetailMethod()" style="margin-left: 20px;">
                                <i class="fa fa-repeat"></i>
                                <span><vc:i18n name="重置" namespace="propertyFee"></vc:i18n></span>
                            </button>
                        </div>
                    </div>
                    <table class="footable table table-stripped toggle-arrow-tiny" style="margin-top:10px" data-page-size="10">
                        <thead>
                            <tr>
                                <th class="text-center">
                                    <vc:i18n name="缴费ID" namespace="propertyFee"></vc:i18n>
                                </th>
                                <th data-hide="phone" class="text-center">
                                    <vc:i18n name="周期(单位:月)" namespace="propertyFee"></vc:i18n>
                                </th>
                                <th data-hide="phone" class="text-center">
                                    <vc:i18n name="缴费方式" namespace="propertyFee"></vc:i18n>
                                </th>
                                <th data-hide="phone" class="text-center">
                                    <vc:i18n name="应收金额(单位:元)" namespace="propertyFee"></vc:i18n>
                                </th>
                                <th data-hide="phone" class="text-center">
                                    <vc:i18n name="实收金额(单位:元)" namespace="propertyFee"></vc:i18n>
                                </th>
                                <th data-hide="phone" class="text-center">
                                    <vc:i18n name="缴费时间" namespace="propertyFee"></vc:i18n>
                                </th>
                                <th data-hide="phone" class="text-center">
                                    <vc:i18n name="缴费起始时间" namespace="propertyFee"></vc:i18n>
                                </th>
                                <th data-hide="phone" class="text-center">
                                    <vc:i18n name="缴费结束时间" namespace="propertyFee"></vc:i18n>
                                </th>
                                <th class="text-center">
                                    <vc:i18n name="收银员" namespace="propertyFee"></vc:i18n>
                                </th>
                                <th data-hide="phone" class="text-center">
                                    <vc:i18n name="状态" namespace="propertyFee"></vc:i18n>
                                </th>
                                <th data-hide="phone" class="text-center">
                                    <vc:i18n name="备注" namespace="propertyFee"></vc:i18n>
                                </th>
                                <th data-hide="phone" class="text-center">
                                    <vc:i18n name="操作" namespace="propertyFee"></vc:i18n>
                                </th>
                            </tr>
                        </thead>
                        <tbody>
                            <tr v-for="feeDetail in feeDetailInfo.feeDetails">
                                <td class="text-center">
                                    {{feeDetail.detailId}}
                                </td>
                                <td class="text-center">
                                    {{feeDetail.cycles}}
                                </td>
                                <td class="text-center">
                                    {{feeDetail.primeRateName}}
                                </td>
                                <td class="text-center" v-if="feeDetail.state=='1500'">
                                    {{feeDetail.payerObjName}}费用中查看
                                </td>
                                <td class="text-center" v-else>
                                    {{feeDetail.receivableAmount}}
                                </td>
                                <td class="text-center">
                                    {{feeDetail.receivedAmount}}<br>
                                    <div v-for="(item,index) in feeDetail.feeAccountDetailDtoList" :key="index" v-bind:value="item.state" v-if="item.state != '1001'">
                                        {{item.stateName}}: {{item.amount}}<br>
                                    </div>
                                    <div v-for="(item,index) in feeDetail.payFeeDetailDiscountDtoList" :key="index" v-bind:value="item.state">
                                        {{item.discountName}}: {{Math.abs(item.discountPrice)}}<br>
                                    </div>
                                </td>
                                <td class="text-center">
                                    {{feeDetail.createTime}}
                                </td>
                                <td class="text-center">
                                    {{vc.dateFormat(feeDetail.startTime)}}
                                </td>
                                <td class="text-center" v-if="feeDetail.startTime >= feeDetail.endTime">
                                    {{vc.dateFormat(feeDetail.endTime)}}
                                </td>
                                <td class="text-center" v-else>
                                    {{vc.dateSubOneDay(vc.dateFormat(feeDetail.endTime),vc.dateFormat(feeDetail.endTime),feeDetail.feeFlag)}}
                                </td>
                                <td class="text-center">{{feeDetail.cashierName || '-'}}</td>
                                <td class="text-center">
                                    {{feeDetail.stateName}}
                                </td>
                                <td class="text-center">
                                    {{feeDetail.remark}}
                                </td>
                                <td class="text-center">
                                    <div class="btn-group" v-if="feeDetail.state=='1400' || feeDetail.state== 1200 || feeDetail.state== ''">
                                        <button class="btn-white btn btn-xs" v-on:click="_openRefundModel(feeDetail)">
                                        <span><vc:i18n name="申请退费" namespace="propertyFee"></vc:i18n></span>
                                    </button>
                                    </div>
                                    <div class="btn-group" v-if="feeDetail.state!='1500'">
                                        <button class="btn-white btn btn-xs" v-on:click="_openFeeDetailDiscountModal(feeDetail)">
                                        <vc:i18n name="折扣" namespace="propertyFee"></vc:i18n>
                                    </button>
                                    </div>
                                </td>
                            </tr>
                        </tbody>
                        <tfoot>
                        <tr>
                            <td colspan="12">
                                <ul class="pagination float-right"></ul>
                            </td>
                        </tr>
                        </tfoot>
                    </table>
                    <!-- 分页 -->
                    <vc:create path="frame/pagination"></vc:create>
                </div>
            </div>
        </div>
    </div>
    <vc:create path="property/returnPayFee"></vc:create>
    <vc:create path="property/viewFeeDetailDiscount"></vc:create>
</div>